package com.winter.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jinhao
 * Date: 2023/01/17 14:03
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class NacosController {

    private final DiscoveryClient discoveryClient;

    @GetMapping("/get/service")
    public String getService() {
//        ServiceInstance service = discoveryClient.getInstances("deal-service").get(0);
//        return JSON.toJSONString(service);
        return null;
    }
}
